﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace B.WMS.Migrations
{
    /// <inheritdoc />
    public partial class rtgfdtrsw : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Pullprice",
                table: "WMSWAllocate");

            migrationBuilder.DropColumn(
                name: "WAllocatename",
                table: "WMSWAllocate");

            migrationBuilder.RenameColumn(
                name: "Unitid",
                table: "WMSWAllocate",
                newName: "WarehouseNoOutName");

            migrationBuilder.RenameColumn(
                name: "Tunestuts",
                table: "WMSWAllocate",
                newName: "WarehouseNoOut");

            migrationBuilder.RenameColumn(
                name: "Tunequantity",
                table: "WMSWAllocate",
                newName: "Num");

            migrationBuilder.RenameColumn(
                name: "Tuneinid",
                table: "WMSWAllocate",
                newName: "WarehouseNoInName");

            migrationBuilder.RenameColumn(
                name: "Specificationmodel",
                table: "WMSWAllocate",
                newName: "WarehouseNoIn");

            migrationBuilder.RenameColumn(
                name: "Pullstuts",
                table: "WMSWAllocate",
                newName: "Reason");

            migrationBuilder.RenameColumn(
                name: "Pullid",
                table: "WMSWAllocate",
                newName: "LocationNoOutName");

            migrationBuilder.RenameColumn(
                name: "Goodstypeid",
                table: "WMSWAllocate",
                newName: "LocationNoOut");

            migrationBuilder.AlterColumn<string>(
                name: "WAllocatecoding",
                table: "WMSWAllocate",
                type: "character varying(20)",
                maxLength: 20,
                nullable: false,
                oldClrType: typeof(string),
                oldType: "character varying(18)",
                oldMaxLength: 18);

            migrationBuilder.AddColumn<string>(
                name: "GoodsName",
                table: "WMSWAllocate",
                type: "text",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "Goodscoding",
                table: "WMSWAllocate",
                type: "text",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "LocationNoIn",
                table: "WMSWAllocate",
                type: "text",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "LocationNoInName",
                table: "WMSWAllocate",
                type: "text",
                nullable: false,
                defaultValue: "");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "GoodsName",
                table: "WMSWAllocate");

            migrationBuilder.DropColumn(
                name: "Goodscoding",
                table: "WMSWAllocate");

            migrationBuilder.DropColumn(
                name: "LocationNoIn",
                table: "WMSWAllocate");

            migrationBuilder.DropColumn(
                name: "LocationNoInName",
                table: "WMSWAllocate");

            migrationBuilder.RenameColumn(
                name: "WarehouseNoOutName",
                table: "WMSWAllocate",
                newName: "Unitid");

            migrationBuilder.RenameColumn(
                name: "WarehouseNoOut",
                table: "WMSWAllocate",
                newName: "Tunestuts");

            migrationBuilder.RenameColumn(
                name: "WarehouseNoInName",
                table: "WMSWAllocate",
                newName: "Tuneinid");

            migrationBuilder.RenameColumn(
                name: "WarehouseNoIn",
                table: "WMSWAllocate",
                newName: "Specificationmodel");

            migrationBuilder.RenameColumn(
                name: "Reason",
                table: "WMSWAllocate",
                newName: "Pullstuts");

            migrationBuilder.RenameColumn(
                name: "Num",
                table: "WMSWAllocate",
                newName: "Tunequantity");

            migrationBuilder.RenameColumn(
                name: "LocationNoOutName",
                table: "WMSWAllocate",
                newName: "Pullid");

            migrationBuilder.RenameColumn(
                name: "LocationNoOut",
                table: "WMSWAllocate",
                newName: "Goodstypeid");

            migrationBuilder.AlterColumn<string>(
                name: "WAllocatecoding",
                table: "WMSWAllocate",
                type: "character varying(18)",
                maxLength: 18,
                nullable: false,
                oldClrType: typeof(string),
                oldType: "character varying(20)",
                oldMaxLength: 20);

            migrationBuilder.AddColumn<decimal>(
                name: "Pullprice",
                table: "WMSWAllocate",
                type: "numeric",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<string>(
                name: "WAllocatename",
                table: "WMSWAllocate",
                type: "character varying(20)",
                maxLength: 20,
                nullable: false,
                defaultValue: "");
        }
    }
}
